package com.zby.demo.dao;

import com.zby.demo.entity.Course;
import com.zby.demo.entity.Student;
import com.zby.demo.entity.StudentSelectCourses;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author ChrisPhantom
 * @CreateDate 2020/12/13 22:10
 */

@Mapper
public interface StudentDao {
    //增加学生
    void addStudent(@Param("student") Student student);

    //学生选课
    void setSelectCourse(@Param("StudentID") String StudentID, @Param("CourseID") String CourseID);

    //学生退选课程
    void deleteSelectCourse(@Param("StudentID") String StudentID, @Param("CourseID") String CourseID);

    //删除学生
    void deleteStudent(@Param("StudentID") String StudentID);

    //批量输出学生
    void deleteStudents(@Param("studentIDs") List<String> studentIDs);

    //修改学生信息（不包含密码）
    void updateStudentInfo(@Param("student") Student student);

    //修改学生密码
    void updateStudentPassword(@Param("StudentID") String StudentID, @Param("Password") String Password);

    //根据学生ID查询学生信息
    Student queryStudentByUsername(@Param("StudentID") String StudentID);

    //按学生ID查询其选的课
    List<Course> querySelectCourseByStudentID(@Param("StudentID") String StudentID);

    //查询所有学生
    List<Student> queryAllStudent();

    //查询学生所选所有课程
    List<StudentSelectCourses> selectcourses();
}
